/**
 * @Author YuanYuan
 * @Date 2022/5/7
 * @Time 17:44
 */
public class TestDemo {
    public static int ifSeries(int[] arr){
        for (int i = 0; i < arr.length-1; i++) {
            if(arr[i]>arr[i+1]) {
                return -1;
            }
        }
        return 1;
    }
    public static void main(String[] args) {
        int[] arr = {1,2,3,7,4};
        int ret = ifSeries(arr);
        if(-1 == ret) {
            System.out.println("无序");
        }else{
            System.out.println("有序");
        }
    }
}
